-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BFT] Epoch Recovery integration test #6823
base: feature/efm-recovery
Are you sure you want to change the base?
[BFT] Epoch Recovery integration test #6823
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/efm-recovery #6823 +/- ##
========================================================
- Coverage 41.81% 41.73% -0.08%
========================================================
Files 1588 2033 +445
Lines 144098 181227 +37129
========================================================
+ Hits 60251 75642 +15391
- Misses 78887 99361 +20474
- Partials 4960 6224 +1264
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
// enters Epoch Fallback Mode can successfully recover. | ||
// For this specific scenario, we are testing a scenario where the consensus committee and Random Beacon committee form a symmetric difference with | ||
// cardinality 1. In other words, there is a node which is part of the consensus committee but not part of the Random Beacon committee and | ||
// another node which is part of the Random Beacon committee but not part of the consensus committee. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// another node which is part of the Random Beacon committee but not part of the consensus committee. | |
// another node which is part of the Random Beacon committee but not part of the consensus committee. | |
// We remove the first consensus node from the Consensus Committee, and the last consensus node from the Random Beacon Committee: | |
// If the original consensus set is {A, B, C, D} then: | |
// - the post-recovery consensus committee is {B, C, D} | |
// - the post-recovery random beacon committee is {A, B, C} | |
// |
internalNodePrivInfoDir, nodeConfigJson := s.getNodeInfoDirs(flow.RoleConsensus) | ||
internalNodes, err := common.ReadFullInternalNodeInfos(unittest.Logger(), internalNodePrivInfoDir, nodeConfigJson) | ||
require.NoError(s.T(), err) | ||
// 3. Eject consensus node by modifying the snapshot before generating the recover epoch transaction args. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 3. Eject consensus node by modifying the snapshot before generating the recover epoch transaction args. | |
// 3. Eject the FIRST consensus node by modifying the snapshot before generating the recover epoch transaction args. |
dkgIndexMap := make(flow.DKGIndexMap, nConsensusNodes) | ||
for i, participant := range randomBeaconParticipants[:nConsensusNodes] { | ||
dkgIndexMap[participant.NodeID] = i | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
dkgKeyShares := dkg.KeyShares()[:nConsensusNodes] |
Putting this next to the corresponding index map construction logic
3000, | ||
false, | ||
dkgIndexMap, | ||
dkg.KeyShares()[:nConsensusNodes], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dkg.KeyShares()[:nConsensusNodes], | |
dkgKeyShares, |
#6645
Context
This PR implements the most general case where Random beacon committee and consensus committee form a symmetric difference with cardinality 1. More details in the attached issue.